#!/usr/bin/perl

use strict;
use warnings;

my $numstr = shift || <STDIN>;
$numstr =~ s/\s//;
my @chars = split //,$numstr;
my $ch;
my $pos = @chars;
my $count = 0;


foreach $ch (@chars) {
	$pos--;
	if ($ch eq '1') {
		print $pos.' ';
		$count++;
	}
}

exit $count;
